body {
    padding: 0;
    margin: 0;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    border: 10px solid black;
    transform: translate(-50%, -50%) rotate(45deg);
}

.loader span {
    /* margin: 0; */
    float: left;
    display: block;
    width: 50px;
    height: 50px;
    background: #2f2f2f;
    animation: animate 2s infinite linear;
}

.loader span:nth-child(3) {
    animation-delay: 0.8s;
}

.loader span:nth-child(2),
.loader span:nth-child(6) {
    animation-delay: 0.6s;
}

.loader span:nth-child(1),
.loader span:nth-child(5),
.loader span:nth-child(9) {
    animation-delay: 0.4s;
}

.loader span:nth-child(4),
.loader span:nth-child(8) {
    animation-delay: 0.2s;
}

@keyframes animate {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(0);
    }
    75% {
        transform: scale(1);
    }
    100% {
        transform: scale(1);
    }
}